package org.jsets.fastboot.frame.entity;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import org.javers.core.metamodel.annotation.DiffIgnore;
import org.jsets.fastboot.persistent.annotation.FieldFill;
import org.jsets.fastboot.persistent.enums.SqlAction;

/**
 * Entity基类
 *
 * @author wangjie (https://github.com/wj596)
 * @date 2021.07.10 21:57
 * @since 0.1
 */
public abstract class BaseEntity extends SuperEntity {
	
	@DiffIgnore
	@ApiModelProperty(value = "创建时间")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@FieldFill(when = SqlAction.INSERT)
	private Date createTime;

	@DiffIgnore
	@ApiModelProperty(value = "创建人")
	@FieldFill(when = SqlAction.INSERT)
	private String createUser;

	@DiffIgnore
	@ApiModelProperty(value = "更新时间")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@FieldFill(when = SqlAction.UPDATE)
	private Date updateTime;

	@DiffIgnore
	@ApiModelProperty(value = "更新人")
	@FieldFill(when = SqlAction.UPDATE)
	private String updateUser;

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getCreateUser() {
		return createUser;
	}

	public void setCreateUser(String createUser) {
		this.createUser = createUser;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public String getUpdateUser() {
		return updateUser;
	}

	public void setUpdateUser(String updateUser) {
		this.updateUser = updateUser;
	}

}